#version 300 es

layout(location = 0) in vec4 vPosition;
layout(location = 1) in vec4 a_color;
layout(location = 2) in vec2 aImage1Position;
layout(location = 3) in vec2 aImage2Position;
layout(location = 4) in vec2 aImage3Position;
layout(location = 5) in vec4 vPicTexturePosition;

uniform mat4 viewMatrix;
uniform sampler2D displacementMap;
uniform mediump int loadImageType;
invariant gl_Position;
out vec2 vImage1Position;
out vec2 vImage2Position;
out vec2 vImage3Position;
void main()
{
    vImage1Position = aImage1Position;
    vImage2Position = aImage2Position;
    vImage3Position = aImage3Position;
    if ( loadImageType == 1)
    {
        gl_Position = vPosition;
    }
    else if (loadImageType == 2)
    {
        gl_Position = vPicTexturePosition;
    }
    else
    {
        gl_Position = viewMatrix * vPosition;
    }
    //gl_Position = viewMatrix * vPosition;
}

